package com.openx.boot.core.entity;


import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author: yadu
 * @date: 2020/2/26 15:01
 * @desc: 实体类父类
 */
@Data
public abstract class AbstractLogicEntity extends AbstractEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "创建人编号", notes = "不需要输入")
    @TableField(value = "create_user_id", fill = FieldFill.INSERT)
    public String createUserId;

    @ApiModelProperty(value = "修改人编号", notes = "不需要输入")
    @TableField(value = "update_user_id", fill = FieldFill.INSERT_UPDATE)
    public String updateUserId;

    @ApiModelProperty(value = "逻辑删除", hidden = true, notes = "不需要输入")
    @TableLogic
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @JSONField(serialize = false)
    @JsonIgnore
    private Integer deleted;
}
